// ReportTempletSet.cpp : implementation file
//

#include "stdafx.h"
#include "kwservercore.h"
#include "ReportTempletSet.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CReportTempletSet

IMPLEMENT_DYNAMIC(CReportTempletSet, CRecordset)

	CReportTempletSet::CReportTempletSet(CDatabase* pdb)
	: CRecordset(pdb)
{
	//{{AFX_FIELD_INIT(CReportTempletSet)
	m_CreateDate = _T("");
	m_CreateTime = _T("");
	m_ShareFlag = 0;
	m_TempletName = _T("");
	m_UserId = _T("");
	m_nFields = 6;
	//}}AFX_FIELD_INIT
	m_nDefaultType = snapshot;
}

CString CReportTempletSet::GetDefaultConnect()
{
	return _T("ODBC;DSN=KWSystem;UID=kwuser;PWD=1234");
}

CString CReportTempletSet::GetDefaultSQL()
{
	return _T("[dbo].[ReportTemplet]");
}

void CReportTempletSet::DoFieldExchange(CFieldExchange* pFX)
{
	//{{AFX_FIELD_MAP(CReportTempletSet)
	pFX->SetFieldType(CFieldExchange::outputColumn);
	RFX_Text(pFX, _T("[CreateDate]"), m_CreateDate);
	RFX_Text(pFX, _T("[CreateTime]"), m_CreateTime);
	RFX_Binary(pFX, _T("[Data]"), m_Data, 8000*10);  // by hubin
	RFX_Byte(pFX, _T("[ShareFlag]"), m_ShareFlag);
	RFX_Text(pFX, _T("[TempletName]"), m_TempletName);
	RFX_Text(pFX, _T("[UserId]"), m_UserId);
	//}}AFX_FIELD_MAP
}

/////////////////////////////////////////////////////////////////////////////
// CReportTempletSet diagnostics

#ifdef _DEBUG
void CReportTempletSet::AssertValid() const
{
	CRecordset::AssertValid();
}

void CReportTempletSet::Dump(CDumpContext& dc) const
{
	CRecordset::Dump(dc);
}
#endif //_DEBUG